﻿package mortal.game.utils
{
    import __AS3__.vec.*;
    import baseEngine.basic.*;
    import baseEngine.modifiers.*;
    import frEngine.effectEditTool.temple.*;
    import mortal.game.scene3D.model.player.*;
    import mortal.game.scene3D.model.pools.*;

    public class PetSelfEffectUtil extends Object
    {

        public function PetSelfEffectUtil()
        {
            return;
        }// end function

        public static function addSelfEffect(param1:ActionPlayer, param2:String, param3:RenderList = null) : void
        {
            var _loc_4:int = 0;
            var _loc_8:EffectPlayer = null;
            if (!param2)
            {
                return;
            }
            var _loc_5:* = GameStrUtil.alzToArray(param2);
            var _loc_6:* = _loc_5[0];
            var _loc_7:* = _loc_5[1];
            _loc_4 = 0;
            while (_loc_4 < _loc_6.length)
            {
                
                _loc_8 = EffectPlayerPool.instance.getEffectPlayer(_loc_6[_loc_4], null, param3, true);
                if (_loc_7.length > _loc_4)
                {
                    _loc_8.hangBoneName = _loc_7[_loc_4];
                }
                param1.hang(_loc_8);
                _loc_8.play(PlayMode.ANIMATION_LOOP_MODE);
                if (_loc_8.temple is TempleRole)
                {
                    (_loc_8.temple as TempleRole).setRoleParams(param1, null, null);
                }
                _loc_4++;
            }
            return;
        }// end function

    }
}
